package com.iss.components.menubar;

import javax.servlet.jsp.JspException;

@SuppressWarnings("serial")
public class MenuItemTag extends BaseMenuTag{
	
	private String text = null;
	private String href= null; 
	private String click = null;
	private String img = null;
	private boolean focus = false;
	
	@Override
	public int doStartTag() throws JspException {
		item = new MenuItem(click,focus,href,img,text);
		Object obj = getParent();
		if (obj instanceof BaseMenuTag){
			BaseMenuTag menuList = (BaseMenuTag)obj;
			menuList.getMenuItem().getItems().add(item);
		}
		return EVAL_BODY_INCLUDE;
	}
	
	@Override
	public int doEndTag() throws JspException {
		item = null ;
		return EVAL_PAGE;
	}

	public String getText() {
		return text;
	}


	public void setText(String text) {
		this.text = text;
	}


	public String getHref() {
		return href;
	}


	public void setHref(String href) {
		this.href = href;
	}


	public String getClick() {
		return click;
	}


	public void setClick(String click) {
		this.click = click;
	}


	public String getImg() {
		return img;
	}


	public void setImg(String img) {
		this.img = img;
	}


	public boolean isFocus() {
		return focus;
	}


	public void setFocus(boolean focus) {
		this.focus = focus;
	}
}
